#include "Bin.h"

ColorBin::ColorBin():_vcenter(ColorLab(0,0,0)),_num(0),_group(-100),_id(3)
{}

void ColorBin::setGroup(int i)
{
	_group = i;
	return;
}
int ColorBin::getGroup() const
{
	return _group;
}

void ColorBin::setId(int i,int j,int k)
{
	_id[0] = i;
	_id[1] = j;
	_id[2] = k;
	return;
}

vector<int> ColorBin::getId() const
{
	return _id;
}

void ColorBin::setCenter(ColorLab centor)
{
	for(int i = 0 ; i < 3 ; i++)
		_vcenter[i]=centor[i];
	return;
}

void ColorBin::InsertPoint(int i,int j)
{
	_num++;
	return;
}

int ColorBin::getNum() const
{
	return _num;
}

ColorLab ColorBin::getCenter() const
{
	return _vcenter;
}

void ColorBin::getCenter_4Byte(float* center) const
{
	center[0] = _vcenter[0];
	center[1] = _vcenter[1];
	center[2] = _vcenter[2];
	center[3] = 0;
	return;
}
